package edu.unc.ils.memai.extract;

import java.util.List;

import java.util.Map;

import maui.stemmers.Stemmer;
import maui.util.Candidate;

import edu.unc.ils.memai.vocab.Vocabulary;

public abstract class CandidateExtractor 
{
    protected Stemmer stemmer;

    protected List<String> stopwords;

    protected boolean toLowerCase = true;

    protected boolean reorder = true;
    
    int maxPhraseLength = 3;
    
    int minPhraseLength = 1;
    
    int minOccurFrequency = 1;
    
    boolean debugMode = false;
    
    protected Vocabulary vocab = null;

    public void setDebugMode(boolean debugMode) {
        this.debugMode = debugMode;
    }
    
    public void setMaxPhraseLength(int maxPhraseLength) {
        this.maxPhraseLength = maxPhraseLength;
    }
    
    public void setMinPhraseLength(int minPhraseLength) {
        this.minPhraseLength = minPhraseLength;
    }
    
    public void setMinOccurFrequency(int minOccurFrequency) {
        this.minOccurFrequency = minOccurFrequency;
    }
    
    public void setLowerCase(boolean toLowerCase) {
        this.toLowerCase = toLowerCase;
    }

    public void setReorder(boolean reorder) {
        this.reorder = reorder;
    }

    public void setStemmer(Stemmer stemmer) {
        this.stemmer = stemmer;
    }
    
    public void setStopwords(List<String> stopwords) {
        this.stopwords = stopwords;
    }
    
    public void setVocabulary(Vocabulary vocab) {
        this.vocab = vocab;
    }

    public abstract Map<String, Candidate> getCandidates(List<String> text) throws Exception;

}
